package org.apache.dolphinscheduler.dao.mapper;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.dolphinscheduler.dao.entity.ProcessInstance;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

public interface OverviewMapper {
    Integer getProcessDefinitionNum(@Param("userId") int userId);

    Integer getFileNum(@Param("userId") int userId);

    Integer getUDFNum(@Param("userId") int userId);

    Integer getUDFNumFromResource(@Param("userId") int userId);

    Integer getDatasourceNum(@Param("userId") int userId);

    List<Long> getProjectCodeByUser(@Param("userId") int userId);

    IPage<ProcessInstance> getProcessInstanceLatest10(Page<ProcessInstance> page, @Param("projectCodes") List<Long> projectCodes);

    List<Map<String, Object>> queryProcessScene(@Param("userId") Integer userId, @Param("startDate") String startDate, @Param("endDate") String endDate);
}
